package com.tcc.util.file;

/**
 * 文件大小枚举类
 *
 * @author tcc
 */
public enum FileSizeUnit {

    B(1, "B"),
    K(1024, "KB"),
    M(1024 * 1024, "MB"),
    G(1024 * 1024 * 1024, "GB"),
    T(1024 * 1024 * 1024 * 1024, "TB"),
    P(1024 * 1024 * 1024 * 1024 * 1024, "PB");

    private long code;

    private String name;

    private FileSizeUnit(long code, String name) {
        this.code = code;
        this.name = name;
    }

    public long getCode() {
        return code;
    }

    public String getName() {
        return name;
    }


}
